<div class="url">
  <% new_or_existing = url.new_record? ? 'new' : 'existing' %>
  <% prefix = "complaint[#{new_or_existing}_url_attributes][]" %>
  <% fields_for prefix, url do |url_form| -%>
    <p>
    <%= url_form.text_field :name, :size=>51 %>
      <span class="task"><%= link_to_function "remove" , "$(this).up('.url').remove()" %></span>
    </p>
  <% end -%>
</div>
